{% extends "stocksys/base/base_page.html" %}
{% load staticfiles %}
{% block headscript %}
{% endblock %}
{% block content %}
    <div class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="content">
                            <h4 class="title">模型列表</h4>
                            <div class="table-responsive">
                                <table class="table">
                                    <thead class="text-primary">
                                    <tr>
                                        <th class="text-center">模型ID</th>
                                        <th class="text-center">模型名称</th>
                                        <th class="text-center">上传时间</th>
                                        <th class="text-center">模型精度</th>
                                        <th class="text-center">训练日期</th>
                                        <th class="text-center">训练时长</th>
                                        <th class="text-center">代码大小</th>
                                        <th class="text-center">操作</th>

                                    </tr>
                                    </thead>
                                    <tbody>
                                    {% for model in  model_info %}
                                        <tr>
                                            <td class="text-center">{{ model.id }}</td>
                                            <td class="text-center">{{ model.name }}</td>
                                            <td class="text-center">{{ model.create_datetime | date:"Y-m-d" }}</td>
                                            <td class="text-center">{{ model.accuracy | floatformat:5 }}</td>
                                            <td class="text-center">{{ model.update_datetime | date:"Y-m-d"}}</td>
                                            <td class="text-center">{{ model.train_time }}秒</td>
                                            <td class="text-center">{{ model.code_size }}KB</td>
                                            <td class="td-actions text-right">
                                                <a href="{% url 'stocksys:code_editor' id=model.id %}"
                                                   rel="tooltip" title="Edit Profile"
                                                   class="btn btn-success btn-simple btn-xs">
                                                    <i class="ti-pencil-alt"></i>
                                                </a>
                                                <p href="#" rel="tooltip" title="Remove"
                                                   class="btn btn-danger btn-simple btn-xs">
                                                    <i class="ti-close"></i>
                                                </p>
                                            </td>
                                        </tr>
                                    {% endfor %}

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block pagescript %}
{% endblock %}

